
#include "error.h"

namespace eqPc
{

namespace
{
struct ErrorData
{
    const uint32_t code;
    const std::string text;
};

ErrorData _errors[] = {
    { ERROR_EQPLY_MAPOBJECT_FAILED, 
      "Mapping data from application process failed" },

    { 0, "" } // last!
};
}

void initErrors()
{
    co::base::ErrorRegistry& registry = co::base::Global::getErrorRegistry();

    for( size_t i=0; _errors[i].code != 0; ++i )
        registry.setString( _errors[i].code, _errors[i].text );
}

void exitErrors()
{
    co::base::ErrorRegistry& registry = co::base::Global::getErrorRegistry();

    for( size_t i=0; _errors[i].code != 0; ++i )
        registry.eraseString( _errors[i].code );
}

}

